import Home from '@/views/Home.vue'
import Auth from '@/views/Auth.vue'
import User from '@/views/User.vue'
import Products from '@/views/Products.vue'
import ProductDetails from '@/components/product/ProductDetails.vue'
import Logout from '@/components/auth/Logout.vue'

const routes = [
	{
		name: 'home',
		path: '/',
		component: Home,
		meta: {
			title: '主页面'
		}
	},
	{
		name: 'auth',
		path: '/auth',
		component: Auth,
		meta: {
			title: '登录/注册'
		}
	},
	{
		name: 'products',
		path: '/products',
		component: Products,
		meta: {
			title: '商品列表'
		}
	},
	{
		path: '/product/:id',
		component: ProductDetails
	},
	{
		name: 'users',
		path: '/users',
		component: User,
		meta: {
			title: '用户列表'
		}
	},
	{
		name: 'logout',
		path: '/logout',
		component: Logout,
		meta: {
			title: '退出登录'
		}
	}
]

export default routes